package com.yt.lxh.client.activity;

import com.yt.lxh.vo.activity.coupon.UserOwnCouponVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "luxuehe-service-activity")
public interface CouponFeignClient {

    /**
     * 用户领取优惠卷
     * @param userId 用户ID
     * @param couponId 优惠券ID
     * @return
     */
    @GetMapping("/add/{userId}/{couponId}")
    public void createUserCouponBy(@PathVariable("userId") String userId, @PathVariable("couponId") String couponId);

    /**
     * 获取用户领取的用户卷列表
     * @param id 用户ID
     * @return
     */
    @GetMapping("/list/{userId}")
    List<UserOwnCouponVO> getCouponListByUserId(@PathVariable("userId") String id);

}
